package cz.muni.fi.pa165.pokemon.service;

import cz.muni.fi.pa165.pokemon.dto.BadgeTO;
import java.util.List;

/**
 *
 * @author Dusan Svancara
 */
public interface BadgeService {
    
    /**
     * Creates new badge.
     * 
     * @param badge 
     * @throws IllegalArgumentException when badge or badge.id is null
     */
    void create(BadgeTO badge);
    
    /**
     * Finds badge by given id.
     * 
     * @param id - unique identification Long number 
     * @throws IllegalArgumentException when id is null
     * @return badge transfer object
     */
    BadgeTO get(Long id);
    
    /**
     * Updates given badge.
     * 
     * @param badge - BadgeTO type parameter to be updated
     * @throws IllegalArgumentException when badge or badge.id is null
     */
    void update(BadgeTO badge);
    
    /**
     * Removes given badge from database.
     * 
     * @param badge - BadgeTO type parameter to be removed
     * @throws IllegalArgumentException when badge or badge.id is null
     */
    void remove(BadgeTO badge);
    
    /**
     * Returns all badges from database.
     * 
     * @return List of all badges
     */
    List<BadgeTO> findAll();
    
    
    /**
     * Looks for given last and first name of badge in database
     * and returns collection of found badge transfer objects with given name.
     * 
     * @param firstName given name of badge, lastName last name of badge
     * @throws IllegalArgumentException when firstName and lastName are both null
     * @return List of badges with given first and last name.
     */
    List<BadgeTO> findByName(String firstName, String lastName);
}
